package com.jthinker.blog.ext.beetl.func;

import org.beetl.core.Context;
import org.beetl.core.Function;

import javax.servlet.http.HttpServletRequest;

public class HasSession implements Function
{
    public Boolean call(Object[] paras, Context ctx)
    {
        HttpServletRequest requet = (HttpServletRequest) ctx.getGlobal("request");
        return requet.getSession(false) != null;
    }
}